/*
 * XML Type:  listarUsuarioResponse
 * Namespace: http://ejb.extranet.bf.pe/
 * Java type: pe.bf.extranet.ejb.ListarUsuarioResponse
 *
 * Automatically generated - do not modify.
 */
package pe.bf.extranet.ejb.impl;

import pe.bf.domain.bean.Usuario;

/**
 * An XML listarUsuarioResponse(@http://ejb.extranet.bf.pe/).
 *
 * This is a complex type.
 */
public class ListarUsuarioResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements pe.bf.extranet.ejb.ListarUsuarioResponse
{
    
    public ListarUsuarioResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName RETURN$0 = 
        new javax.xml.namespace.QName("", "return");
    
    
    /**
     * Gets array of all "return" elements
     */
    public Usuario[] getReturnArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(RETURN$0, targetList);
            Usuario[] result = new Usuario[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "return" element
     */
    public Usuario getReturnArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            Usuario target = null;
            target = (Usuario)get_store().find_element_user(RETURN$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "return" element
     */
    public int sizeOfReturnArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(RETURN$0);
        }
    }
    
    /**
     * Sets array of all "return" element
     */
    public void setReturnArray(Object[] xreturnArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
//            arraySetterHelper(xreturnArray, RETURN$0);
        }
    }
    
    /**
     * Sets ith "return" element
     */
    public void setReturnArray(int i, Usuario xreturn)
    {
        synchronized (monitor())
        {
            check_orphaned();
            Usuario target = null;
            target = (Usuario)get_store().find_element_user(RETURN$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target=(xreturn);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "return" element
     */
    public Usuario insertNewReturn(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            Usuario target = null;
            target = (Usuario)get_store().insert_element_user(RETURN$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "return" element
     */
    public Usuario addNewReturn()
    {
        synchronized (monitor())
        {
            check_orphaned();
            Usuario target = null;
            target = (Usuario)get_store().add_element_user(RETURN$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "return" element
     */
    public void removeReturn(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(RETURN$0, i);
        }
    }
}
